473,464 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Display textbox with no border

tfs
I am trying to display some data that is about 200 characters long and
I was trying to display it on the screen in a textbox

<asp:textbox />

But I don't want any borders.

How would I display that?

Thanks,

Tom
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 18 '05 #1
6 10696
See if this helps.
<html>
<head>
<style type="text/css">
<!--
input { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
10 px; color: #003068; text-decoration: none; background-color: #FFFFFF;
border-color: #88A0C8 #88A0C8 #88A0C8; border-style: solid;
border-top-width: 0 px; border-right-width: 0 px; border-bottom-width: 0
px; border-left-width: 0 px}
-->
</style>
</head>
<body>
<input type="text" value="Some Text Here"></input>
</body>
</html>

Won't you be confusing the User with this technique. Check out the Label
Control if required.

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
See if this helps.
<html>
<head>
<style type="text/css">
<!--
input { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
10 px; color: #003068; text-decoration: none; background-color: #FFFFFF;
border-color: #88A0C8 #88A0C8 #88A0C8; border-style: solid;
border-top-width: 0 px; border-right-width: 0 px; border-bottom-width: 0
px; border-left-width: 0 px}
-->
</style>
</head>
<body>
<input type="text" value="Some Text Here"></input>
</body>
</html>

Won't you be confusing the User with this technique. Check out the Label
Control if required.

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
tfs
That almost works (style="border:none") as does borderstyle="None".
But it doesn't get rid of the scrollbar on the left. The border is
gone but there is this scroll bar sitting out on the right (even
though there is nothing to scroll). I have it set to 5 rows and
there is only 2 or 3 rows displaying.

I have a similar problem with my dropdownlist. I have the border set
to none and it still shows the drop down box. I only want to show
the selected item and no border.

Here is code where I set them as well as the objects:

<script runat="server">
...
description.text = objDataReader("description")
recurrance.SelectedIndex =
objDataReader("recurrance")
...
</script>

<asp:textbox style="border:None"
id="description" TextMode="Multiline"
Columns="50" Rows="5" runat="server"
/>
<asp:dropdownlist borderstyle="None"
id="recurrance" runat="server">
<asp:listitem value="0"
None</asp:listitem> <asp:listitem value="1"Daily</asp:listitem> <asp:listitem value="2"Weekly</asp:listitem> <asp:listitem value="3"Monthly</asp:listitem> <asp:listitem value="4"Yearly</asp:listitem>

</asp:dropdownlist>
Thanks,

Tom.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 18 '05 #4
Here it is. Tested only on IE 5.5 & 6.0

textarea {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10 px;
color: #003068;
text-decoration: none;
background-color: #FFFFFF;
border-top-width: 0 px; border-right-width: 0 px; border-bottom-width:
0px; border-left-width: 0 px;
SCROLLBAR-FACE-COLOR: white;
SCROLLBAR-HIGHLIGHT-COLOR: white;
SCROLLBAR-SHADOW-COLOR: white;
SCROLLBAR-3DLIGHT-COLOR: white;
SCROLLBAR-ARROW-COLOR: white;
SCROLLBAR-TRACK-COLOR: white;
SCROLLBAR-DARKSHADOW-COLOR: white;
SCROLLBAR-BASE-COLOR:white;}

Regards

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #5
tfs
Interesting.

You actually didn't get rid of the scrollbar, just made all the parts
the same color as the background (in this case, white).

The problem with this would be that all the text boxes would have this
applied.

I just changed the "textarea" to .noscrolltextarea and put the class
in the <td> like so:
<tr valign="baseline">
<td nowrap align="right"
valign="top">Description:</td>
<td>
<asp:textbox class="noscrolltextarea"
id="description" TextMode="Multiline"
Columns="50" Rows="5" runat="server"
/>
</td>
</tr>
I am curious why the textarea works for the textbox (wouldn't you need
to use textbox?).

I still couldn't get the dropdownlist to hide the border and just show
the selected text so I just hid the dropdownlist control, set the
selected area and moved it to a label control. There may be a better
way, but this works.

[code:1:c24f5c16f8]
recurrenceType.SelectedValue =
objDataReader("recurrenceType")
recurrenceDisplay.text = recurrenceType.SelectedItem.text

<td nowrap align="right">Recurrance:</td>
<td>
<asp:label id="recurrenceDisplay"
runat="server" />
<asp:dropdownlist style="visibility:hidden"
id="recurrenceType" runat="server">
<asp:listitem value="N"
None</asp:listitem> <asp:listitem value="M"Monthly</asp:listitem> <asp:listitem value="P"Periodic</asp:listitem>

</asp:dropdownlist>
</td>
[/code:1:c24f5c16f8]
Thanks,

Tom
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 18 '05 #6
I used the stylesheet for the TEXTAREA b'cos, the ASP.NET TextBox gets
rendered as a Input Tag when you set the TextMode to SingleLine and as a
textArea when you set it to MultiLine. There is another option called
Password.

NOTHING HAS CHANGED IN HTML. So it is still the same <INPUT>,
<TEXTAREA>, <DIV>, <TABLE> etc that you see as controls on the Server.
With a little hack you can achieve what you want.

If you do a viewsource in IE, you can see what is really happening.

Regards,

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: dale zhang | last post by:
Hi, I build a web form with a 4-cell table on the top (flawlayout), followed by some labels and textboxes (gridlayout). The web form is displayed well in dell m60 laptop with all resolution...
8
by: tshad | last post by:
I cannot seem to get the asp:textbox to use classes. Style works fine. I am trying to set the textbox to act like a label in some instance so it doesn't have a border, readonly and the background...
0
by: Barb | last post by:
Has anyone seen this happen? I have pages with <asp:Textbox> and <asp:DropDownList> controls on them. Some of them display differently. Some are recessed with the left & top borders being gray...
1
by: Jeff | last post by:
hey asp.net 2.0 In my website I've got a textbox with TextMode=MultiLine. The user can enter text that contain "new line"... But to displays this I'm also using a textbox with...
8
by: Filipe Marcelino | last post by:
Hi, I'm trying to create a textbox inheriting from the standard textbox. I would like to: 1. repaint the textbox border; 2. define a color for that border; Till now I made this:
1
by: satish.vell | last post by:
Hi, I have a ASP.NET page inside which I toggle the display of a field using javascript. How can I save this display value between postbacks. Here is my code: <pre>
3
by: Shawn T | last post by:
I have an application with a page that has a web user control When I call that page that has this user control, locally (http:// localhost/ApplicationX/default.aspx) and also externally ie...
2
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully...
2
by: mrutyunjaya | last post by:
hello, i have two textbox column and one button control in gridvie when i click button it will ask plese enter price in first textbox . when enter values it is asking again. how to pass...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.